Telegram Group & Telegram Channel
Получаем информацию о памяти на диске

Со встроенным модулем shutil многие уже, вероятно, знакомы, но его обычно используют в контексте задач копирования, переноса файлов и папок.

Но с помощью shutil мы можем даже получить информацию о памяти на жестком диске компьютера. Метод disk_usage возвращает количество всей, занятой и свободной памяти.

Так как все три значения возвращаются в байтах, в примере мы их перевели и вывели в гигабайты для лучшей наглядности.

#shutil



tg-me.com/python_academy/957
Create:
Last Update:

Получаем информацию о памяти на диске

Со встроенным модулем shutil многие уже, вероятно, знакомы, но его обычно используют в контексте задач копирования, переноса файлов и папок.

Но с помощью shutil мы можем даже получить информацию о памяти на жестком диске компьютера. Метод disk_usage возвращает количество всей, занятой и свободной памяти.

Так как все три значения возвращаются в байтах, в примере мы их перевели и вывели в гигабайты для лучшей наглядности.

#shutil

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/957

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

How Does Bitcoin Mining Work?

Bitcoin mining is the process of adding new transactions to the Bitcoin blockchain. It’s a tough job. People who choose to mine Bitcoin use a process called proof of work, deploying computers in a race to solve mathematical puzzles that verify transactions.To entice miners to keep racing to solve the puzzles and support the overall system, the Bitcoin code rewards miners with new Bitcoins. “This is how new coins are created” and new transactions are added to the blockchain, says Okoro.

How to Invest in Bitcoin?

Like a stock, you can buy and hold Bitcoin as an investment. You can even now do so in special retirement accounts called Bitcoin IRAs. No matter where you choose to hold your Bitcoin, people’s philosophies on how to invest it vary: Some buy and hold long term, some buy and aim to sell after a price rally, and others bet on its price decreasing. Bitcoin’s price over time has experienced big price swings, going as low as $5,165 and as high as $28,990 in 2020 alone. “I think in some places, people might be using Bitcoin to pay for things, but the truth is that it’s an asset that looks like it’s going to be increasing in value relatively quickly for some time,” Marquez says. “So why would you sell something that’s going to be worth so much more next year than it is today? The majority of people that hold it are long-term investors.”

Python Academy from ca


Telegram Python Academy
FROM USA